public class E5 {
    public static void main(String[] args) {
        int m=8;
        int i=1;
        long t=m;
        long sum=0;
        for (i=1;i<=10;i++){
            sum+=t;
            t=t*10+m;
        }
        System.out.println(sum);
    }
}
